package Java.A;

public class Rectangle implements Ishape {
    Point ptTopLeft;
    Point ptTopRight;
    int width;
    int height;

    public Rectangle() {
        this.ptTopLeft = new Point();
        this.width = 0;
        this.height = 0;
    }

    public Rectangle(Point topLeft, int width, int height) {
        this.ptTopLeft = topLeft;
        this.width = width;
        this.height = height;
    }

    public double perimeter() {
        return 2 * (width + height);
    }

    public double area() {
        return width * height;
    }

    public void draw() {
        System.out.println("长方形：");
    }

    public static void main(String[] args) {

    }

}
